package com.reading.common.entity.view;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

@Getter
@Setter
@NoArgsConstructor
public class Label {

    private Integer labelId;

    @NotEmpty(message = "标签内容不得为空。")
    @Length(min = 2, max = 8, message = "标签内容字数应为2~8个字。")
    private String labelName;

    public Label(String labelName) {
        this.labelName = labelName;
    }
}